// ArrowedLine class - ArrowedLine element for scene - draws and manages an arrowed line in the scene
ArrowedLine.prototype = new Shape();  
ArrowedLine.prototype.constructor=ArrowedLine;
function ArrowedLine(x, y, w, h){
	this.x = x;
	this.y = y;
	this.w= w;
	this.h= h;
	this.as = 10;

	this.angle = Math.atan2(this.h,this.w);
	
	this.updateBoundary(this.x-1,this.y-1,this.w+35,this.h+35);
	this.draw = function(ctx){
		this.setStyles(ctx);
		ctx.beginPath();
		ctx.moveTo(this.x,this.y);
		ctx.lineTo(this.x+this.w,this.y+this.h);
		ctx.lineTo(this.x+this.w-this.as*Math.cos(this.angle-Math.PI/6),this.y+this.h-this.as*Math.sin(this.angle-Math.PI/6));
		ctx.moveTo(this.x+this.w,this.y+this.h);
		ctx.lineTo(this.x+this.w-this.as*Math.cos(this.angle+Math.PI/6),this.y+this.h-this.as*Math.sin(this.angle+Math.PI/6));
		this.executeDraw(ctx);
	};
}
